<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
    <div id="app">
        数组里面有数据？：{{hasData}}
    </div>
    <script>
        const {createApp} = Vue
        createApp(
            {
                data(){
                    return {
                       names:["张三","李四","王五","赵六","高七"] 
                    }
                },
                methods: {
                    
                },
                computed:{//计算属性
                    hasData(){
                        return this.names.length > 0?"是":"否";
                    }
                }
            }
        ).mount("#app");
    </script>
</body>
</html>